# numbers = [1, 2, 3, 4, 5]
# print(numbers.pop())                             # 删除列表中的最后一个元素
# print(numbers)
# print(numbers.pop(1))                           # 删除列表中索引为1的元素
# print(numbers)
# idioms = ["万事如意", "发愤图强", "笑容满面", "意气风发", "强颜欢笑"]
# linked_idioms = [idioms[0]]
# idioms.remove(idioms[0])
#
# for _ in range(len(idioms)):
#     last_char = linked_idioms[-1][-1]
#     for i in idioms:
#         if i[0] == last_char:
#             linked_idioms.append(i)
#             idioms.remove(i)
#
# print(linked_idioms)

# tuple_str = tuple('abc')
# tuple_list = tuple({1, 2, 3, 4, 5})
# print(tuple_str)
#
# print(tuple_list)

# 废纸、塑料瓶、食材废料、餐巾纸
# trash = ['废纸', '塑料瓶', '食材废料', '餐巾纸']
# trash_category = {
#     "可回收垃圾": ('废纸', '塑料瓶', '易拉罐'),
#     "厨余垃圾": ('食材废料', '鸡骨'),
#     "其他垃圾": ('餐巾纸', '保鲜膜')
# }
# bin = {
#     "可回收垃圾": [],
#     "厨余垃圾": [],
#     "其他垃圾": []
# }
# # print(trash_category.items())
# for _ in trash:
#     for category, item in trash_category.items():
#         if _ in trash_category[category]:
#             bin[category].append(_)
# print(bin)

# set_one = set()            	                    # 创建一个空集合
# set_one.add('Python')       	# 使用add()方法向集合中添加元素
# print(set_one)
# set_one.add('Python')       	# 使用add()方法向集合中添加同一个元素
# print(set_one)

# set_demo = set()  		                  # 创建一个空集合
# set_demo.update({"Python", "Java", "C++"})        # 使用update()方法向集合中添加元素
# print(set_demo)

# vocabulary_book = set()
# vocabulary_book.add("book:书")
# while True:
#     mode = input("请输入你要选择的功能(0-查看单词本/1-背单词/2-添加新单词/3-删除单词/4-清空单词本/5-退出)：")
#     if mode == '0':
#         if len(vocabulary_book):
#             print(vocabulary_book)
#         else:
#             print("当前单词本为空", vocabulary_book)
#     elif mode == '1':
#         if len(vocabulary_book):
#             for word in vocabulary_book:
#                 parts = word.split(':')
#                 input_word = input(f"请给出对应的英语单词：{parts[1]}")
#                 if input_word == parts[0]:
#                     print("太棒了")
#                 else:
#                     print("再想想")
#         else:
#             print("单词本当前为空")
#     elif mode == '2':  #  添加新单词
#         word = input("请输入新单词与含义（中间以:连接，例如”book:书）：")
#         vocabulary_book.add(word)
#     elif mode == '3':  # 删除单词
#         if len(vocabulary_book):
#             delete_word = input(f'当前单词本有单词:{vocabulary_book},请输入要删除的单词：').strip()
#             found = False
#             for word in vocabulary_book.copy():
#                 parts = word.split(':')
#                 if delete_word == parts[0]:
#                     found = True
#                     vocabulary_book.discard(word)
#                     break
#             if found:
#                 if vocabulary_book:
#                     print(f"该单词已删除,单词本为{vocabulary_book}")
#                 else:
#                     print('该单词已删除,当前单词本为空')
#             else:
#                 print("该单词不存在")
#         else:
#             print("单词本当前为空")
#     elif mode == '4':  # 清空单词本
#         if len(vocabulary_book):
#             vocabulary_book.clear()
#             print("当前单词本已为空")
#         else:
#             print("单词本当前为空")
#     elif mode == '5':  # 添加新单词
#         print('退出单词本')
#         break

per_info = {'001': '张三', '002': '李四', '003': '王五' }
print(per_info.keys())




